package com.by.com.dao.bean;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * 分页查询条件基础类
 */
@ApiModel(value = "zpfPage分页查询条件")
public class Page {

    private final int DEFAULT_PAGE=1;//默认第一页
    private final int DEFAULT_PAGE_SIZE=10;//默认每页显示10条记录
@ApiModelProperty( value = "当前页码",example = "1")
    int page;
@ApiModelProperty( value = "每页显示条数",example = "10")
    int pageSize;

    public int getPage() {
        if (this.page == 0)
            return DEFAULT_PAGE;
        return page;
    }

    public void setPage(int page) {
        if (page <= 0)
            this.page = DEFAULT_PAGE;
        else
            this.page = page;
    }

    public int getPageSize() {
        if(this.pageSize==0)
            return DEFAULT_PAGE_SIZE;
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }
}
